package com.demo.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.demo.entity.User;
import com.demo.feign.Demo1Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhr
 */
@RestController
public class UserController {
    private final Demo1Service demo1Service;

    public UserController(Demo1Service demo1Service) {
        this.demo1Service = demo1Service;
    }

    @GetMapping("user/list")
    public Page<User> getList() {
        return demo1Service.list();
    }
}
